﻿using System;
using NewLife.Log;
using NewLife.Net;
using NewLife.Remoting;

namespace NewLifeTest1
{
    class Program
    {
        static void Main(string[] args)
        {
            XTrace.UseConsole();

            var svr = new ApiServer(10001)
            {
                Log = XTrace.Log,
                EncoderLog = XTrace.Log,
                StatPeriod = 5
            };

            var ns = svr.EnsureCreate() as NetServer;
            ns.SocketLog = XTrace.Log;
            ns.SessionLog = XTrace.Log;
            ns.LogSend = true;
            ns.LogReceive = true;

            svr.Start();

            Console.ReadKey();
        }
    }
}
